import request from "./http";
export const getBanner = (params: any = {}) => {
  return request.get("/banner", {
    params: { ...params },
  });
};
export const resource = (params: any = { limit: 10 }) => {
  return request.get("/personalized", {
    params: { ...params },
  });
};

export const highquality = (params: any = {}) => {
  return request.get("/top/playlist/highquality", {
    params: { ...params },
  });
};

export const playlist = (params: any = {}) => {
  return request.get("/top/playlist", {
    params: { ...params },
  });
};
export const radioes = (params: any = {}) => {
  return request.get("/dj/catelist", {
    params: { ...params },
  });
};
export const radioesforpay = (params: any = {}) => {
  return request.get("/dj/paygift", {
    params: { ...params },
  });
};
//个性推荐的电台
export const recommendpersonalize = (params: any = {}) => {
  return request.get("/dj/personalize/recommend", {
    params: { ...params },
  });
};
//各种电台，需传入cateId方可使用
export const variousradios = (params: any = {}) => {
  return request.get("/dj/radio/hot", {
    params: { ...params },
  });
};
export const toplist = (params: any = {}) => {
  return request.get("/toplist", {
    params: { ...params },
  });
};
//排行榜名单，需传入id
export const lblists = (params: any = {}) => {
  return request.get("/top/list", {
    params: { ...params },
  });
};
//歌手排行榜名单前5个
export const artistlists = (params: any = {}) => {
  return request.get("/toplist/artist?limit=5", {
    params: { ...params },
  });
};
//不同种类歌手的列表，需传入参数{type，area，initial}
export const getVariousSingers = (params: any = {}) => {
  return request.get("/artist/list", {
    params: { ...params },
  });
};
//获取新歌列表，需传入typeN
export const getNewsongs = (params: any = {}) => {
  return request.get("/top/song", {
    params: { ...params },
  });
};

export const personalized = (params: any = { limit: 9 }): Promise<any> => {
  return request.get("/personalized", {
    params: { ...params },
  });
};

export const getPlaylistHot = (params: any = {}) => {
  return request.get("/playlist/hot", {
    params: { ...params },
  });
};
export const privatecontentList = (params: any = {}) => {
  return request.get("/personalized/privatecontent/list", {
    params: { ...params },
  });
};

export const personalizedNewsong = (params: any = {}) => {
  return request.get("/personalized/newsong", {
    params: { ...params },
  });
};

export const personalizedMv = (params: any = {}) => {
  return request.get("/personalized/mv", {
    params: { ...params },
  });
};

export const personalizeDjprogram = (params: any = {}) => {
  return request.get("/personalized/djprogram", {
    params: { ...params },
  });
};

export const playlistDetail = (params: any = {}) => {
  return request.get("/playlist/detail", {
    params: { ...params },
  });
};

export const getPlaylistDetail = (params: any = {}) => {
  return request.get("/playlist/detail", {
    params: { ...params },
  });
};

export const getsongUrl = (params: any = {}) => {
  return request.get("/song/url", {
    params: { ...params },
  });
};
//需传入音乐id {ids=...[id1,id2,....]}
export const getSongdetailByids = (params: any = {}) => {
  return request.get("/song/detail", {
    params: { ...params },
  });
};
//可获取新碟上架列表 可选参数：area，type ，year，month，limit，offset，
export const getTopAlbum = (params: any = {}) => {
  return request.get("/top/album", {
    params: { ...params }
  });
};
export const getLyric = (params:any = {}) =>{
  return request.get('/lyric',{
    params:{...params}
  })
}
export const getComments = (params:any = {})=>{
  return request.get('/comment/music',{
    params:{...params}
  })
}
export const getSimiSong=(params:any={})=>{
  return request.get('/simi/song',{
    params:{...params}
  })
}
/**----------------带上时间戳--------------- */
export const getLoginQrKey=(params:any={})=>{
  return request.get('/login/qr/key',{
    params:{...params}
  })
}
export const getQrImg=(params:any={})=>{
  return request.get('/login/qr/create',{
    params:{...params}
  })
}
export const getQrState=(params:any={})=>{
  return request.get('/login/qr/check',{
    params:{...params}
  })
}
/**----------------带上时间戳--------------- */
export const getLoginStatus = ()=>{
  return request.get('/login/status')
}
export const getAccount = () => {
  return request.get('/user/account')
}
export const quitLogin = (params:any={}) => {
  return request.get('/logout',{
    params:{...params}
  })
}
//参数 uid
export const getUserDetail = (params:any={}) =>{
  return request.get('/user/detail',{
    params:{...params}
  })
}
export const getMvDetail = (params:any={})=>{
  return request.get('/mv/detail',{
    params:{...params}
  })
}
export const getMvUrl = (params:any={})=>{
  return request.get('/mv/url',{
    params:{...params}
  })
}

